package org.pp.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 权限（菜单）
 * </p>
 *
 * @author haima
 * @since 2024-04-20
 */
@Getter
@Setter
@TableName("sys_menu")
@Schema(name = "SysMenu", description = "权限（菜单）")
public class SysMenu implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "权限id")
    @TableId(value = "menu_id", type = IdType.AUTO)
    private Long menuId;

    @Schema(description = "父级Id")
    private Long pid;

    @Schema(description = "名称")
    private String name;

    @Schema(description = "图标")
    private String icon;

    @Schema(description = "后端权限标识")
    private String api;

    @Schema(description = "前端路由/按钮")
    private String route;

    @Schema(description = "0代表目录 1代表菜单 2代表按钮")
    private Integer type;

    @Schema(description = "排序")
    private Integer sort;

    @Schema(description = "租户号")
    private Long tenantId;

    @Schema(description = "乐观锁")
    private Integer revision;

    @Schema(description = "创建时间")
    private LocalDateTime createdTime;

    @Schema(description = "更新时间")
    private LocalDateTime updatedTime;

    @Schema(description = "逻辑删除")
    private Boolean deleted;
}
